WebInput.NET EditFormat has client side events model. Every client side event handler at least has 1 parameter (controlId).
In this topic, you will learn how to use EditFormat client side events in WebInput.
To use WebInput EditFormat events
- Drag WebInput instance to WebForm.
- Go to WebInput EditFormatClientSideEvents property.
- Add WebInput1_OnAfterValidate to OnAfterValidate event.
- Add WebInput1_OnBeforeValidate to OnBeforeValidate event.
- Add WebInput1_OnValidateError to OnValidateError event.
- Add WebInput1_OnAfterCharValidate to OnAfterCharValidate event.
- Add WebInput1_OnBeforeCharValidate to OnBeforeCharValidate event.
- In client side, add WebInput1_OnAfterValidate function and put the following code:
JavaScript Copy Code
function WebInput1_OnAfterValidate(controlId)
{
alert("OnAfterValidate event is triggered");
}
- In client side, add WebInput1_OnBeforeValidate function and put the following code:
JavaScript Copy Code
function WebInput1_OnBeforeValidate(controlId)
{
alert("OnBeforeValidate event is triggered");
}
- In client side, add WebInput1_OnValidateError function and put the following code:
JavaScript Copy Code
function WebInput1_OnValidateError(controlId)
{
alert("OnValidateError event is triggered");
}
- In client side, add WebInput1_OnAfterCharValidate function and put the following code:
JavaScript Copy Code
function WebInput1_OnAfterCharValidate(controlId)
{
alert("OnAfterCharValidate event is triggered");
}
- In client side, add WebInput1_OnBeforeCharValidate function and put the following code:
JavaScript Copy Code
function WebInput1_OnBeforeCharValidate(controlId)
{
alert("OnBeforeCharValidate event is triggered");
}
- Compile and run the Project.
Tasks
{How to: Use WebInput events}
{How-to: Use calculator editor events}
{How-to: Use DateTime editor events}
{How-to: Use display format events}
Concepts
{Client Side Events}
References
EditFormatClientSideEvents Property
OnAfterValidate Property
OnBeforeValidate Property
OnValidateError Property
OnAfterCharValidate Property
OnBeforeCharValidate Property